home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
026-050
/
scopedisk46
/
mj-pgs
/
readme
< prev
next >
Wrap
Text File
|
1995-03-18
|
5KB
|
85 lines
The programs in this group are in AmigaBasic and designed to generate and
plot Mandelbrot and Julia sets. The time-critical iteration routine of
the generator (MJ.Gen_T) is written in assembly language by Martin F. Combs
with whom I have been in correspondence since early in 1987. An additional
innovation by Martin is that the ML program operates on long integers which
are derived by multiplying input parameters by 2^28. As a result, the pro-
gram is extremely fast (about 3 times as fast as the usual Mandelbrot pro-
grams written in C, available as PD or Shareware). Its precision is limit-
ed to that of singe-precision floating point, sufficient to calculate all
of the "Maps" in H.-O. Peitgen and P.H. Richter's book "The Beauty of Frac-
tals" in 640x400 screen format. The only exception is Map 49 for which a
slower, double-precision generator by M. Combs (multiplying by 2^60) was
required. Contributions to the Basic code were by Martin, Zoltan Szepesi
and myself.
An important feature of our system is that the geneator writes a sequential
file which consists of the iteration counts associated with each pixel of
the area to be plotted. While this may take several hours, it needs to be
done only once. The file can then be read from disk in about 10-20 minutes
and plotted in a variety of ways provided by a program (MJ.plot_T) which
allows the use of different palettes and "breakpoints" (counts where the
color should change). The choice of the lowest and highest counts to be
used can modify the appearance of the plot in important ways. The generator
itself does have a more primitive plotting capability whose only purpose is
to estimate these parameters and to center the location of the area with
with sufficient precision.
In addition to the file of iteration counts, the generator also produces a
file of the frequency of occurrance of each count. We call this the stat
file. It is useful as input to utility programs which facilitate the divi-
sion of counts so that each color occurs in areas of appropriate size. The
program M-graph_T plots a bargraph of the stat file and the program
Divide_T produces what amounts to a division of this bargraph into equal-
area sections. Another technique for dividing the range of counts is by a
geometric series produced by "Breakpoints" which is a subroutine in the
plotting portion of the generator. The separate "Brkpts_T" program is
included.
The Divide.Combs program uses the number of pixels/screen rather than two
arrays as my divide program does. It is much shorter and faster. Although
it has no knowledge of the iteration limit, it nevertheless recognizes the
areas in which it has been reached, i.e. which belong to the set.
The third file produced by the generator is the "inform" file. It is a re-
cent addition and simply a summary of all of the parameters of the region
to be investigated. Plot and utility programs read it and use what they
need.
Closed Julia sets are often shown with a structured interior. We had no
idea what was used to differentiate the interior sections, but it occured
to me that where the count has reached the iteration limit, the size^2 is
variable and could therefore be used to provide some interior structure.
These values can range from 1E-5 (rarely) to 4 (theoretically, but in prac-
tice much less than 4). Martin Combs has ingeniously modified the assembly
routine so that if the iteration limit is reached, the corresponding value
of size is multiplied by 'jsizelimit'/4 and this product is added to the
iteration limit before being returned to the Basic program. For purposes
of working with long integers derived from inputs multiplied by 2^28, this
value should be entered as a power of 2. Added to a practical iteration
limit of 1000, the highest number which the .stat file data can be dimen-
sioned would be 5096 which should suffice in almost all cases. I know of
no way in which one can anticipate the minimum factor required to scale
the lowest existing values of size to a useable (integer) value, i.e. 1,
other than applying a Basic program which returns the actual sizes during
the process of generating the .count file. I have done this only rarely.
A very important utility is a means to write a file of breakpoints and
palettes called SelectColors, written by Martin Combs (included here as
Sel.Cols). Finally, an ASCII file of the assembly routine used in MJ.Gen_T
is included as J-size.asc. For those who (by now) wonder about the meaning
of _T: it means text file (I prefer to save my Amigabasic programs in ASCII
format). I also use _A (binary AmigaBasic), _D (datafile), _B (binary), _E
(executable), _AB (ABasiC), _P (picture). A new dir or list routine is
needed so that I'll no longer try to load an IFF picture into AmigaBasic!!
I normally use GRABBiT to save pictures, but this requires external memory
with mode 4 screens of reasonable size. Martin has excerpted 'sub_saveILBM'
from the saveILBM program by Carolyn Scheppner (on the Extras disk). It may
may be appended to MJ.plot_T and is included in this package.
Detailed instructions on using the programs are provided in a separate
Instruct file.
Anselm Wachtel